home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Ink Effects.dir / Scripts_23_Constrain Moveable Sprite.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  426 b   |  19 lines

  1. on mouseDown
  2.   set the constraint of sprite 7 to 6
  3.   set the constraint of sprite 8 to 6
  4.   updateStage()
  5. end
  6.  
  7. on mouseUp
  8.   global gObjectH, gObjectV
  9.   if the visible of sprite 7 = 1 then
  10.     set gObjectH to the locH of sprite 7
  11.     set gObjectV to the locV of sprite 7
  12.   else
  13.     if the visible of sprite 8 = 1 then
  14.       set gObjectH to the locH of sprite 8
  15.       set gObjectV to the locV of sprite 8
  16.     end if
  17.   end if
  18. end
  19.